package org.linlinjava.litemall.admin.web2.goods.resp;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.linlinjava.litemall.core.util.Util;
import org.linlinjava.litemall.db.domain.TGoods;
import org.linlinjava.litemall.db.domain.TGoodsApply;
import org.linlinjava.litemall.db.enumeration.Const;

@ApiModel
public class GResp6 {

    @ApiModelProperty("id")
    private Integer id;
    @ApiModelProperty("店铺")
    private String shopName;
    @ApiModelProperty("分类")
    private String catalog;
    @ApiModelProperty("图片")
    private String img;
    @ApiModelProperty("标题")
    private String mainTitle;
    @ApiModelProperty("子标题")
    private String subTitle;
    @ApiModelProperty("销售价")
    private Double salePrice;
    @ApiModelProperty("当前价")
    private Double currentPrice;
    @ApiModelProperty("折扣")
    private Double discount;
    @ApiModelProperty("佣金")
    private Integer commission;

    public GResp6(TGoodsApply entity) {
        id = entity.getId();
        shopName = entity.getShopName();
        img = entity.getGoodsImg();
        mainTitle = entity.getTitle();
        subTitle = entity.getSubTitle();
        salePrice = entity.getSalePrice().doubleValue();
        currentPrice = entity.getCurrentPrice().doubleValue();
        discount = currentPrice / salePrice;
        commission = entity.getCommission();
    }

    public GResp6() {

    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getCatalog() {
        return catalog;
    }

    public void setCatalog(String catalog) {
        this.catalog = catalog;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getMainTitle() {
        return mainTitle;
    }

    public void setMainTitle(String mainTitle) {
        this.mainTitle = mainTitle;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public Double getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(Double salePrice) {
        this.salePrice = salePrice;
    }

    public Double getCurrentPrice() {
        return currentPrice;
    }

    public void setCurrentPrice(Double currentPrice) {
        this.currentPrice = currentPrice;
    }

    public Double getDiscount() {
        return discount;
    }

    public void setDiscount(Double discount) {
        this.discount = discount;
    }

    public Integer getCommission() {
        return commission;
    }

    public void setCommission(Integer commission) {
        this.commission = commission;
    }
}
